import pygal
from die import Die

die1 = Die()
die2 = Die(10)

result = []
for item in range(0, 50000):
    die_num = die1.roll() + die2.roll()
    result.append(die_num)

requencies = []
die_nums = die1.num_point + die2.num_point
for value in range(2, die_nums+1):
    frequency = result.count(value)
    requencies.append(frequency)

hist = pygal.Bar()
hist.title = "Results of rolling 50000 times."
hist.x_labels = ['2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']
hist.x_title = "Result"
hist.y_title = "Frequency of Result"

hist.add('D6 D10', requencies)
hist.render_to_file('die_visual.svg')
